package com.qyhl.module_practice.order;

import com.qyhl.webtv.commonlib.entity.UpTokenBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeOrderListBean;

public class PracticeOrderPresenter implements PracticeOrderContract.PracticeOrderPresenter {
    private PracticeOrderActivity mView;

    private PracticeOrderModel mModel;

    PracticeOrderPresenter(PracticeOrderActivity mView) {
        this.mView = mView;
        this.mModel = new PracticeOrderModel(this);
    }

    @Override
    public void getTypeList(String instId) {
        mModel.getTypeList(instId);
    }

    @Override
    public void upload(String volId, String insId, String address, String detail, String name, String creator, String type, String imgs, String upPhone) {
        mModel.upload(volId, insId, address, detail, name, creator, type, imgs,upPhone);
    }

    @Override
    public void getToken(boolean isUpload) {
        mModel.getToken(isUpload);
    }

    @Override
    public void setTypeList(PracticeOrderListBean bean) {
        mView.setTypeList(bean);
    }

    @Override
    public void setTypeError(String msg) {
        mView.setTypeError(msg);
    }

    @Override
    public void uploadSuccess(String msg) {
        mView.uploadSuccess(msg);
    }

    @Override
    public void uploadError(String msg) {
        mView.uploadError(msg);
    }

    @Override
    public void getTokenSuccess(UpTokenBean data, boolean isUpload) {
        mView.getTokenSuccess(data, isUpload);
    }

    @Override
    public void getTokenError(boolean isUpload) {
        mView.getTokenError(isUpload);
    }
}
